# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=py3-pytest-metadata
pkgver=3.1.1
pkgrel=0
pkgdesc="pytest plugin for test session metadata"
url="https://github.com/pytest-dev/pytest-metadata"
arch="noarch"
license="MPL-2.0"
depends="py3-pytest"
makedepends="
	py3-gpep517
	py3-hatch-vcs
	py3-hatchling
	py3-wheel
	"
subpackages="$pkgname-pyc"
source="https://pypi.python.org/packages/source/p/pytest_metadata/pytest_metadata-$pkgver.tar.gz"
builddir="$srcdir/pytest_metadata-$pkgver"

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	python3 -m venv --clear --without-pip --system-site-packages .testenv
	.testenv/bin/python3 -m installer .dist/*.whl
	.testenv/bin/python3 -m pytest
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/*.whl
}

sha512sums="
20c880cd797534dee9206ef99755643fccc9d62521f1b50dbcc7f2ac0a8ab6adccc4158510c00e20308bed93ada180448ac9f06277cc1af3ba94a1b903da4b09  pytest_metadata-3.1.1.tar.gz
"
